# Contributor: Matthew T Hoare <matthew.t.hoare@gmai.com>
# Maintainer: Matthew T Hoare <matthew.t.hoare@gmai.com>
pkgname=mokutil
pkgver=0.6.0
pkgrel=1
pkgdesc="Utility to manipulate the machine owner keys (MOK) stored in the database of shim"
url="https://github.com/lcp/mokutil"
arch="aarch64 armhf armv7 x86 x86_64" # Secure Boot is only available for these platforms
license="GPL-3.0-or-later"
makedepends="
	autoconf
	automake
	efivar-dev
	keyutils-dev
	openssl-dev>3
	"
options="!check" # no tests provided
subpackages="$pkgname-doc $pkgname-bash-completion"
source="https://github.com/lcp/mokutil/archive/$pkgver/$pkgname-$pkgver.tar.gz
	00-efivar.patch
	"

prepare() {
	default_prepare
	autoreconf -f -i
}

build() {
	./configure \
		--prefix=/usr \
		--sbindir=/sbin \
		--sysconfdir=/etc
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
11a9d172dba4fbb674e58e5d82cb1dc65a80cff844c0eaebd106b4d4608b24a8207e0cfabf36fe1eedb67f68a8a18db2136c7b62aa3230ac104615e8284dbd7d  mokutil-0.6.0.tar.gz
9a86d96d3f224e480bf888a527814260a753e4b33bcc3d42e44214cf597d72c99cbcd7dde2a40273b60bd69340a366e87f1ef0d508d08efe45eca0e5113a3141  00-efivar.patch
"
